package common.commands;

import common.AltaRicaModelManager;

public class CommandCurrentModel implements ICommand {

	@Override
	public String getName() {
		
		return "current-model";
	}

	@Override
	public String getSynopsis() {
		
		return "current-model";
	}

	@Override
	public CommandValue run(String arg) {
		if (AltaRicaModelManager.getCurrentModel() != null && AltaRicaModelManager.getCurrentModel().getAst() != null) {
			System.out.println("Current model : " + AltaRicaModelManager.getCurrentModel().getAst().getFileName());
		}
		else
		{
			System.out.println("No model loaded");
		}
		return CommandValue.OK;
	}

	@Override
	public String help() {
		
		return "This command show CLAC GUI workbench";
	}

}
